package com.example.oversea_home_spring.serviceImpl;

import com.example.oversea_home_spring.bean.User;
import com.example.oversea_home_spring.mapper.UserMapper;
import com.example.oversea_home_spring.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    //自动注入
    @Autowired
    private UserMapper userMapper;


    @Override
    public User login(String account, String password) {
        return userMapper.login(account,password);
    }

    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public int  updateMyInfo(User user){
        return userMapper.updateMyInfo(user);
    }

}
